#include<iostream>
#include<vector>
using ll= long long;
using namespace std;

int main(){
	int n;
	cin>>n;
	vector<int> a(n);
	ll sum=0,powsum=0; 
	for(int i=0;i<n;i++){
		cin>>a[i];
		sum+=a[i];
		powsum+=(ll)(a[i]*a[i]);
	}
	ll ans=sum*sum-powsum;
	cout<<sum<<endl;
	return 0;
	
} 
